//
//  UIView+ExtensionResponder.swift
//  Weibo
//
//  Created by ZhuDong on 16/6/9.
//  Copyright © 2016年 itcast. All rights reserved.
//

import UIKit

extension UIView{
    func findNavigationController() -> UINavigationController?{
        var responder = self.nextResponder()
        while responder != nil {
            if let nav = responder as? UINavigationController {
                return nav;
            }
            responder = responder?.nextResponder()
        }
        return nil
    }
}